<template>
  <div class="msg" v-if="$store.state.orderIsShow">
      <div class="close" @click="close">x</div>
    <header class="header"><span class="">订单管理</span>/详情</header>

    <div class="base-msg">
      <div class="base-msg-header">基本信息</div>
      <div class="base-con">
        <div class="order">
          <span> 订单编号:{{ data.order_number }} </span>
          <div class="recommed">推荐人:{{ data.name }}</div>
        </div>
        <div class="rem">
          <div class="sb">
            <div>应付金额:{{ data.order_quantity }}</div>
            <div>实际支付:{{ data.order_status }}</div>
          </div>
          <div class="sb pay">
            <div>支付方式:{{ data.pay_method }}</div>
            <div>支付状态:{{ data.pay_status }}</div>
          </div>
        </div>
        <div>
          <div>创建时间:{{ dayjs(new Date(data.create_time )).format("YYYY-MM-DD HH:mm:ss")   }}</div>
          <div>支付时间:{{ dayjs(new Date(data.pay_date)).format("YYYY-MM-DD HH:mm:ss")  }}</div>
        </div>
      </div>
    </div>

    <Shopmsg></Shopmsg>

    <div class="rig">
      <div class="btns sb">
        <div class="comeback btn" @click="show">取消</div>
        <div class="sure btn">
          <span class="_sure" @click="show">确定</span>
        </div>
      </div>
    </div>

      


  </div>
</template>

<script>
import Shopmsg from "./Shopmsg";
import {Bus} from '../Bus/index'
export default {
  components: {
    Shopmsg,
  },
  data() {
    return {
      shopmsg: [],
      num: "",
      data: {},
      isShow: false,
    };
  },
  beforeCreate() {},
  mounted() {
    Bus.$on('ordermmsg',(val)=>{
        this.data=val
        // console.log(val);
    })

  },

  methods: {
    close(){
        this.$store.commit("changeOrder");
    },
    show() {
      this.$store.commit("changeOrder");
      // this.$store.state.orderIsShow = !this.$store.state.orderIsShow
    },
  },
  components: {
    Shopmsg,
  },

};
</script>

<style scoped>
.close{
    padding: 10px 15px 10px 15px;
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f2f2f2;
    color: red;
    cursor: pointer;
}
.recommed {
  width: 200px;
}
.rem.rem {
  width: 624px;
}
.pay.pay {
  width: 250px;
}
.order.order {
  width: 574px;
}
.sb {
  width: 200px;
  display: flex;
  justify-content: space-between;
}
.rig {
  display: flex;
  justify-content: flex-end;
}
.base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.msg {
  overflow-y: auto;
  overflow: none;
  position: absolute;
  top: 100px;
  left: 150px;
  right: 150px;
  padding: 20px;
  bottom: 0;
  background-color: #ffffff;
  z-index: 10;
}
/*修改某个div的滚动条样式*/
div::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  /**/
}

.header {
  font-size: 30px;
}
.base-msg {
  border: 1px solid #e0e0e0;
  margin: 20px 0 40px;
}
.base-msg-header {
  box-sizing: border-box;
  padding-left: 30px;
  height: 70px;
  line-height: 70px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f2f2f2;
}
.base-con {
  height: 200px;
  box-sizing: border-box;
  padding: 20px;
}
.base-con > div {
  display: flex;
  justify-content: space-between;
  height: 50px;
  width: 600px;
}
.btns {
  position: absolute;
  width: 140px;
  height: 30px;
  bottom: 20px;
  right: 20px;
}
.btn {
  text-align: center;
  width: 60px;
  height: 30px;
  line-height: 30px;
  border-radius: 2px;
  cursor: pointer;
}
.comeback {
  box-sizing: border-box;
  border: 1px solid #818281;
}
.sure {
  color: #ffffff;
  background-color: #0083ee;
}
</style>